package com.yufubao.model.dto.management.authorization;

import com.yufubao.framework.core.validator.constraints.Phone;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;


/**
 * @description 注册
 * @author zhangyiheng
 * @date 2024/9/5 23:18
 */
@Data
public class ManagerRegisterDto {

    @NotEmpty(message = "账号不能为空")
    @Length(min = 5, max = 19, message="账号长度在5-18字符")
    private String account;

    @NotEmpty(message = "密码必须填写")
    @Length(min = 6,max = 18,message = "密码必须是6—18位字符")
    private String password;

    @NotEmpty(message = "姓名必须填写")
    @Length(min = 2,max = 5,message = "姓名必须是2—5位字符")
    private String realName;

//    @NotEmpty(message = "手机号不能为空")
//    @Pattern(regexp = "^[1]([3-9])[0-9]{9}$", message = "手机号格式不正确")
    @Phone
    private String phone;

    @NotEmpty(message = "验证码不能为空")
    private String code;

}
